﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LTSMZ.life.Model;
using LTSMZ.life.DAL;

namespace LTSMZ.life.BLL
{
    public class PImgBll
    {
        PImgDal dal = new PImgDal();
        /// <summary>
        /// 添加图片
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public int Add(PImg p)
        {
            return dal.Add(p);
        }
        /// <summary>
        /// 显示图片
        /// </summary>
        /// <returns></returns>
        public List<PImg> ShowPImg()
        {
            return dal.ShowPImg();
        }
        /// <summary>
        /// 根据商品编号获取商品图片
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<PImg> GetPimg(int id)
        {
            return dal.GetPimg(id);
        }
        /// <summary>
        /// 根据商品编号获取商品主图片
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public List<PImg> GetPimgzhu(int id)
        {
            return dal.GetPimgzhu(id);
        }
    }
}
